<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>class内部工作机制</title>
  </head>
  <body></body>
  <script>
    //类的内部工作机制就是原型操作，本质是一个函数
    class User {
      constructor(name) {
        this.name = name;
      }
      show() {
        console.log(this.name);
      }
    }
    console.log(typeof User);

    let u = new User("李四");
    u.show();
    console.log(u);
  </script>
</html>
